import { HOST } from './constant'

const install = (app) => {
  // 此为自定义配置参数，具体参数见上方说明
  app.config.globalProperties.$u.http.setConfig({
    baseUrl: HOST,
    loadingText: '努力加载中~',
    loadingTime: 800,
    showLoading: false,
    // 配置请求头信息
    header: {
      'Access-Control-Allow-Origin': '*',
      'Access-Control-Allow-Headers': '*',
      'content-type': 'text/plain; charset=utf-8',
    },
  })
}

export default {
  install,
}
